package com.eagift.nettyDemo;

import com.eagift.nettyDemo.listener.ApplicationEnvironmentPreparedEventListener;
import com.eagift.nettyDemo.listener.ApplicationFailedEventListener;
import com.eagift.nettyDemo.listener.ApplicationPreparedEventListener;
import com.eagift.nettyDemo.listener.ApplicationReadyEventListener;
import com.eagift.nettyDemo.listener.ApplicationStartedEventListener;
import com.eagift.nettyDemo.listener.ApplicationStartingEventListener;
import com.eagift.nettyDemo.listener.SpringApplicationListener;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class NettyDemoApplication {

	public static void main(String[] args) {
		//SpringApplication.run(NettyDemoApplication.class, args);
		SpringApplication springApplication = new SpringApplication(NettyDemoApplication.class);
		springApplication.addListeners(new ApplicationEnvironmentPreparedEventListener());
		springApplication.addListeners(new ApplicationFailedEventListener());
		springApplication.addListeners(new ApplicationPreparedEventListener());
		springApplication.addListeners(new ApplicationReadyEventListener());
		springApplication.addListeners(new ApplicationStartedEventListener());
		springApplication.addListeners(new ApplicationStartingEventListener());
		springApplication.addListeners(new SpringApplicationListener());
		springApplication.run(args);
	}

}
